import { useAccount } from "@/stores/account";
import { useCommentAppoint, useCommentBatch, useCommentLoop, useCommentManuallys } from "@/stores/comment";
import { useSession } from "@/stores/sesstion";
import { defineComponent, ref } from "vue";
import styles from './styles.module.css';
import { showToast } from "@/utils/utils";
import { useOuter } from "@/stores/outer";


export default defineComponent({
    setup(_props, _ctx) {
        const outerStores = useOuter();
        const accountStore = useAccount();

        return () => {
            return (
                <div >
                    {outerStores.list.map((item, index) => {
                        return <el-row class={styles.inputBox}>
                            <el-col span={2} class={styles.inputText}>总数</el-col>
                            <el-col span={6} class={styles.text}><el-input-number v-model={item.num} max={10000} min={1} controls-position="right" style="width:100%;" size="small" step={1} step-strictly></el-input-number></el-col>
                            <el-col span={3} class={styles.inputText}>&nbsp;个,间隔</el-col>
                            <el-col span={4} class={styles.text}><el-input-number v-model={item.time} max={10} min={1} controls-position="right" style="width:100%;" size="small" step={1} step-strictly></el-input-number></el-col>
                            <el-col span={1} class={styles.inputText}>&nbsp;秒</el-col>
                            <el-col span={4} class={styles.text}>
                                {() => {
                                    if (index == 0) {
                                        return <el-input-number v-model={item.timeNum} max={99} min={1} controls-position="right" style="width:100%;" size="small" step={1} step-strictly></el-input-number>;
                                    } else {
                                        return (
                                            <el-select v-model={item.timeNum} size="small" placeholder="请选择">
                                                {() => {
                                                    return new Array(11).join('|').split('|').map((_item, index) => {
                                                        return (
                                                            <el-option
                                                                label={index == 0 ? '随机' : `${index}个`}
                                                                value={index}>
                                                            </el-option>
                                                        );
                                                    })

                                                }}
                                            </el-select>
                                        );
                                    }
                                }}
                            </el-col>
                            <el-col span={1} class={styles.inputText}>
                                {index == 0 ? <span>&nbsp;个</span> : ''}
                            </el-col>
                            <el-col span={3}>
                                <el-button size="small" type="primary" onClick={() => {

                                }}>{item.text}</el-button></el-col>
                        </el-row>;
                    })}

                </div>

            );
        }
    },
});
